docs: add .nvmrc, .tool-versions, and env setup guide (closes #579)#605
Open
draycolix wants to merge 1 commit into
Open
docs: add .nvmrc, .tool-versions, and env setup guide (closes #579)#605draycolix wants to merge 1 commit into
draycolix wants to merge 1 commit into
Conversation
…up guide Closes solana-foundation#579 Adds the following to address inconsistent environment setup: - .nvmrc pinning Node 20 (matches @types/node ^20.9.0 devDependency) - .tool-versions for asdf users pinning Node 20.18.0 + pnpm 10.33.0 - New 'Environment Setup' section in CONTRIBUTING.md explaining how to use these files with nvm/fnm/asdf and corepack for pnpm Solana/Anchor versions intentionally not pinned here as they vary per example. Users should check each example's Cargo.toml. Refs the recurring Node 23 issues reported in solana-foundation#579 thread. No code or test changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds version constraint files and an environment setup section to address inconsistent environment setup reported in #579.
Changes
.nvmrc— pins Node 20 (matches@types/node: ^20.9.0devDependency).tool-versions— for asdf users: Node 20.18.0 + pnpm 10.33.0 (matchespackageManagerfield)CONTRIBUTING.md— new "Environment Setup" section explaining how to use these files with nvm/fnm/asdf + corepackWhy
Issue #579 reports examples failing due to:
.nvmrc/.tool-versions/ Docker for consistent environmentsThis PR addresses the Node and pnpm portion. Solana/Anchor versions vary per example so I intentionally did not pin them globally — users should check each example's
Cargo.toml(I can add a per-example table in a follow-up if maintainers want).Tested
.nvmrcworks withnvm installandfnm install.tool-versionsworks withasdf install(assuming asdf-nodejs and asdf-pnpm plugins)corepack enable && corepack prepare pnpm@10.33.0 --activateinstalls correct pnpmChecklist
Happy to iterate on the pnpm version or add Solana/Anchor pinning per example in a follow-up PR.